# -*- coding: utf-8 -*-
# @Time    : 2024/8/29 15:16
# @Author  : Alvin
# @File    : get_access_token.py
from app.libs.my_http import Http


def get_access_token(appid, secret):
    params = {
        'grant_type': 'client_credential',
        'appid': appid,
        'secret': secret
    }
    response = Http.get('https://api.weixin.qq.com/cgi-bin/token', params=params)
    print(f"get access_token response: {response}")
    return response['access_token']
